import { FC } from "react"
import Taro, { useRouter } from '@tarojs/taro'
import success from '../../resource/success.png'
import style from './style.less'

const Success: FC = () => {
  const router = useRouter()
  const renew = Number(router.params.renew)

  return (
    <div className={style.root}>
      <img src={success} alt="" />
      <div className="success">{renew ? '续费成功' : '开通成功'}</div>
      <div className="back" onClick={() => { Taro.navigateBack({ delta: 1 }) }}>返回</div>
    </div>
  )
}

export default Success